<template>
	<view class="content">
		<view class="tac fw">已添加资产类型</view>
		<view class="typeList" v-for="item in list" :key="item.id">
			<view class="disb aic">
				<view class="left disp aic">
<!--					<image src="" mode=""></image>-->
					<text>{{item.typeName}}</text>
				</view>
				<text class="colorb">已完善{{item.percentum}}%</text>
			</view>
		</view>
		<view class="nextBtn tac colorf" @click="toAddProperty">去完善添加</view>
	</view>
</template>

<script>
	import { toProperty } from '../../api/category.js';
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad() {
			this.getPropertyMess()
		},
		methods:{
			//获取资产
			getPropertyMess(){
				toProperty().then(res => {
					this.list = res.data
				})
			},
			toAddProperty(i){
				uni.navigateTo({
					url:`/pages/setting/assetType`
				})
			},
		}
	}
</script>

<style lang="scss">
.content{
	padding: 25rpx;
	min-height: 100vh;
	background-color: #f7f7f7;
}
.typeList{
	padding: 30rpx 20rpx;
	margin: 20rpx 0;
	border-radius: 10rpx;
	background-color: #fff;
	box-shadow: 0 0 20rpx #ccc;
	.left{
		image{
			width: 50rpx;
			height: 50rpx;
			border-radius: 10rpx;
			margin-right: 10rpx;
		}
	}
}
.nextBtn{
	width: 80%;
	line-height: 80rpx;
	border-radius: 40rpx;
	background-color: #0055ff;
	margin: 40rpx auto;
}
</style>
